package com.ant.storage.mapper;

import com.ant.storage.dto.InventoryDto;
import com.ant.storage.dto.PickingDto;
import com.ant.storage.pojo.Commodity;
import com.ant.storage.pojo.Inventory;
import com.ant.storage.pojo.Picking;
import com.ant.storage.vo.CommodityVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author melon
 * @since 2022-04-13
 */
public interface CommodityMapper extends BaseMapper<Commodity> {

    CommodityVo commodityAndGood(@Param("id") Integer id);


    List<CommodityVo> commodityAndGoodList(@Param("id") Integer id,
                                           @Param("goodsType") String goodsType);

    Object queryCommodity(Integer commodity_id, Integer warehouse_id);

    List<Inventory> queryCommodityList(Integer page, Integer limit, @Param("map") Map map);

    Integer countCommodityList(@Param("map") Map map);

    String selectLastID();

    Inventory getCommodityInventory(@Param("commodityId") Integer commodityId);

    List<CommodityVo> commodityAndGoodLists(Integer parentId);

    List<Commodity> selectCarList(@Param("dto") InventoryDto dto);

    Integer  selectCarCount(@Param("dto") InventoryDto dto);

    List<CommodityVo> commodityAndGoodId(@Param("id") Integer id);
}
